// TOP
// NEWS    
// MOVIE    
// GALLERY    
// VOICE    
// SONG    
// STORY    
// SPECIAL    
// GAME    
import {RouteRecordRaw} from "vue-router";
import Greet from "../../../../ui/Greet.vue";

let app = ["top",
    "news",
    "movie",
    "gallery",
    "voice",
    "song",
    "story",
    "special",
    "game",];

const target = "/home/debi/IdeaProjects/WebUI/v1-tauri/src/plugins/router/children/"
for (let name of app) {
    let filePath = target + name + ".ts";
    console.log(filePath)
    let toUpperCase = name.toUpperCase();
    let sd = `
import {RouteRecordRaw} from "vue-router";
import ${toUpperCase} from "@/page/${name}.vue";
const ${name}: RouteRecordRaw = {
    children: [],
    path: '/${name}',
    component: ${toUpperCase},
    meta: {
        icon: 'p-${name}',
        title: 'menu.${name}',
    }
};
export default ${name};`
    await Bun.write(filePath, sd);
}
